# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=wpan-tools
pkgver=0.9
pkgrel=2
pkgdesc="Configure and test 802.15.4 devices"
url="https://linux-wpan.org/"
arch="all"
license="ISC"
depends="libnl3-dev linux-headers"
makedepends="$depends_dev"
options="!check" # upstream doesn't have a test suite currently
source="https://github.com/linux-wpan/wpan-tools/releases/download/wpan-tools-$pkgver/wpan-tools-$pkgver.tar.xz
	"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
16fbdd9c1e53e351a2858a81d67fa37027b5e39b26e57f2c1ba0c76d3cf6dcc018e7cae8276a68f47fabbd92ec53fda7b47b48f84424ab457093353fe96c4347  wpan-tools-0.9.tar.xz
"
